home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
turbotut.arc
/
LOOPIF.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-06-30
|
550b
|
21 lines
PROGRAM loops_and_ifs;
VAR count,index : INTEGER;
BEGIN (* Main program *)
FOR count := 1 TO 10 DO
BEGIN (* Main loop *)
IF count < 6 THEN WRITELN('The loop counter is up to ',count:4);
IF count = 8 THEN
BEGIN
FOR index := 8 TO 12 DO
BEGIN (* Internal loop *)
WRITE('The internal loop index is ',index:4);
WRITE(' and the main count is ',count:4);
WRITELN;
END; (* Internal loop *)
END; (* If count = 8 condition *)
END; (* Main loop *)
END. (* Main program *)